home *** CD-ROM | disk | FTP | other *** search
/ Delphi Developer's Kit 1996 / Delphi Developer's Kit 1996.iso / power / wsanet8a / wsanet / common / ctl3d.bas < prev    next >
Encoding:
BASIC Source File  |  1995-12-22  |  2.0 KB  |  63 lines

  1. Option Explicit
  2.  
  3. ' Ctl3d Function declarations
  4. Declare Function GetModuleHandle Lib "Kernel" (ByVal ModuleName As String) As Integer
  5. Declare Function Ctl3dAutoSubclass Lib "Ctl3D.DLL" (ByVal hInst As Integer) As Integer
  6. Declare Function Ctl3dRegister Lib "Ctl3D.DLL" (ByVal hInst As Integer) As Integer
  7. Declare Function Ctl3dUnregister Lib "Ctl3D.DLL" (ByVal hInst As Integer) As Integer
  8. Declare Function Ctl3dSubclassDlg Lib "Ctl3D.DLL" (ByVal hWndDlg As Integer, ByVal wgrBit As Integer) As Integer
  9. Declare Function Ctl3dSubclassDlgEx Lib "Ctl3D.DLL" (ByVal hWndDlg As Integer, ByVal wgrBit As Long) As Integer
  10. Declare Function Ctl3dDlgFramePaint Lib "Ctl3D.DLL" (ByVal hWndDlg As Integer, ByVal uMsg As Integer, ByVal wParam As Integer, ByVal lParam As Long) As Long
  11. Declare Function Ctl3dSubclassCtl Lib "Ctl3D.DLL" (ByVal hWnd As Integer) As Integer
  12.  
  13. ' Ctl3dSubclassDlg3d flags
  14. Global Const CTL3D_BUTTONS = 1
  15. Global Const CTL3D_LISTBOXES = 2
  16. Global Const CTL3D_EDITS = 4
  17. Global Const CTL3D_COMBOS = 8
  18. Global Const CTL3D_STATICTEXTS = 16
  19. Global Const CTL3D_STATICFRAMES = 32
  20.  
  21. Global Const CTL3D_NODLGWINDOW = &H10000
  22. Global Const CTL3D_ALL = &HFFFF
  23.  
  24. Global Const WM_USER = &H400
  25. Global Const WM_DLGBORDER = WM_USER + 3567
  26.  
  27. ' WM_DLGBORDER *(int FAR *)lParam return codes
  28. Global Const CTL3D_NOBORDER = 0
  29. Global Const CTL3D_BORDER = 1
  30.  
  31. Global Const WM_DLGSUBCLASS = WM_USER + 3568
  32.  
  33. ' WM_DLGSUBCLASS *(int FAR *)lParam return codes
  34. Global Const CTL3D_NOSUBCLASS = 0
  35. Global Const Ctl3d_Subclass = 1
  36.  
  37. ' Resource ID for 3dcheck.bmp (for .lib version of ctl3d)
  38. Global Const CTL3D_3DCHECK = 26567
  39.  
  40. Sub Ctl3d_Load ()
  41. Dim hInst As Integer
  42. Dim iRet As Integer
  43. Dim sAppName As String
  44.  
  45.     sAppName = App.EXEName
  46.     hInst = GetModuleHandle(sAppName)
  47.     iRet = Ctl3dRegister(hInst)
  48.     iRet = Ctl3dAutoSubclass(hInst)
  49.  
  50. End Sub
  51.  
  52. Sub Ctl3d_Unload ()
  53. Dim hInst As Integer
  54. Dim iRet As Integer
  55. Dim sAppName As String
  56.  
  57.     sAppName = App.EXEName
  58.     hInst = GetModuleHandle(sAppName)
  59.     iRet = Ctl3dUnregister(hInst)
  60.  
  61. End Sub
  62.  
  63.